﻿namespace NHibernate.Sidekick.Data.NHibernate
{
    /// <summary>
    /// Primary database operations.
    /// </summary>
    public enum DataOperation
    {
        /// <summary>
        /// Remove the instance from the datastore.
        /// </summary>
        Delete,

        /// <summary>
        /// Re-read the state of the given instance from the underlying database.
        /// </summary>
        Refresh,

        /// <summary>
        /// Insert the given instance.
        /// </summary>
        Save,

        /// <summary>
        /// Either insert or update the persistent instance, depending upon resolution of the unsaved-value checks.
        /// </summary>
        SaveOrUpdate, 

        /// <summary>
        /// Update the instance.
        /// </summary>
        Update
    }
}